<!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">-->
<html>
<head>
<title>Adding Randomization to Pts (No weights on Neighbors)</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="js/OpenError.js"></script>
<script type="text/javascript">
	var pts;
	
	  	pts = {"type":"MultiPoint",
	  	"coordinates":[[0,0],[0,5],[0,10],
					[5,0],[5,5],[5,10],
					[10,0],[10,5],[10,10]
					]
		};
    
    var dist = Array(
        Array(0, 5, 10, 5, 7.07, 11.18, 10, 11.18, 14.14),
        Array(5, 0, 5, 7.07, 5, 7.07, 11.18, 10, 11.18),
        Array(10, 5, 0, 11.18, 7.07, 5, 14.14, 11.18, 10),
        Array(5, 7.07, 11.18, 0, 5, 10, 5, 7.07, 11.18),
        Array(7.07, 5, 7.07, 5, 0, 5, 7.07, 5, 7.07),
        Array(11.18, 7.07, 5, 10, 5, 0, 11.18, 7.07, 5),
        Array(10, 11.18, 14.14, 5, 7.07, 11.18, 0, 5, 10),
        Array(11.18, 10, 11.18, 7.07, 5, 7.07, 5, 0, 5),
        Array(14.14, 11.18, 10, 11.18, 7.07, 5, 10, 5, 0)
        );


	var errorModel;
  function initialize() {
	errorModel = new OpenError.Model(pts, dist, {k:5});

	alert( pts.coordinates[2][1] );
	//plotPoints();
  }
  
  function plotPoints()
  {
	var newPoints = errorModel.generateErrorSet();

  }

</script>
</head>
<body onLoad="initialize()">
  <div id="map_canvas" style="width:500px; height:300px"></div>
  <div id="debug"></div>

</body>
</html>
